<?php 
	namespace app\data\model;

	use think\Model;

	/**
	* 规格属性模型
	*/
	class ShopSpecAttr extends Model
	{
		/**
		 * 关联规格
		 * @return [type] [description]
		 */
		public function spec_attr()
		{
			return $this->belongsTo('ShopSpec','id');
		}

		/**
		 * 获取属性sort
		 * @param string $value [description]
		 */
		public function get_attr($id)
		{
			$data = $this->where('spec_id',$id)->select();
			return $data;
		}
	}